/* eslint-disable */
import Router from 'koa-router'
import config from '../config'
import db from '../models'
import checkToken from '../middlewares/check-token'

const router = new Router({
  prefix: config.app.routerBaseApi
})

const onlineProducts = require('../controllers/onlineProducts')
const shopProducts = require('../controllers/shopProducts')

const users = require('../controllers/users')

router
  .post('/getContentList', onlineProducts.getContentList) // 获取列表
  .post('/getContentById', onlineProducts.getContentById) // 获取详情
  .post('/contentSearch', onlineProducts.contentSearch)  // 关键字模糊查询

  .post('/getShopList', shopProducts.getShopList) // 获取列表
  .post('/userStorage', users.userStorage) // 存储用户数据
  .post('/register', users.register) // 用户注册
  .get('/ifRegister', users.ifRegister) // 判断是否已经被注册
  .post('/login', users.login) // 用户登录
  .post('/getValidateCode', users.getValidateCode) // 获取短信验证码
  
export default router
